package com.example.d4_synchronized_code;

/**
 * 目标：解决线程安全问题-同步代码块
 */
public class ThreadTest {
    public static void main(String[] args) {
        Account aac = new Account("111", 100000);
        new DrawThread(aac, "小明").start(); // 小明
        new DrawThread(aac, "小红").start(); // 小红

        Account aac1 = new Account("112", 100000);
        new DrawThread(aac1, "小黑").start(); // 小黑
        new DrawThread(aac1, "小白").start(); // 小白
    }
}
